<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>BigDecimal</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" />
<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
<script src="../js/main.js" type="text/javascript" charset="utf-8"></script>
<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script>

</head>

<body>     
    <div class="banner">
        
            <span>Ruby on Rails v4.0.0</span><br />
        
        <h1>
            <span class="type">Class</span> 
            BigDecimal 
            
                <span class="parent">&lt; 
                    
                    <a href="Object.html">Object</a>
                    
                </span>
            
        </h1>
        <ul class="files">
            
            <li><a href="../files/activesupport/lib/active_support/core_ext/big_decimal/conversions_rb.html">activesupport/lib/active_support/core_ext/big_decimal/conversions.rb</a></li>
            
            <li><a href="../files/activesupport/lib/active_support/core_ext/object/duplicable_rb.html">activesupport/lib/active_support/core_ext/object/duplicable.rb</a></li>
            
            <li><a href="../files/activesupport/lib/active_support/json/encoding_rb.html">activesupport/lib/active_support/json/encoding.rb</a></li>
            
        </ul>
    </div>
    <div id="bodyContent">
        <div id="content">
  


  


  
  


  


  
    <!-- Method ref -->
    <div class="sectiontitle">Methods</div>
    <dl class="methods">
      
        <dt>#</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="BigDecimal.html#method-i-_original_to_s">_original_to_s</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>D</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="BigDecimal.html#method-i-duplicable-3F">duplicable?</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>E</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="BigDecimal.html#method-i-encode_with">encode_with</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>T</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="BigDecimal.html#method-i-to_d">to_d</a>,
              </li>
            
              
              <li>
                <a href="BigDecimal.html#method-i-to_formatted_s">to_formatted_s</a>,
              </li>
            
              
              <li>
                <a href="BigDecimal.html#method-i-to_s">to_s</a>
              </li>
            
          </ul>
        </dd>
      
    </dl>
  

  



  

    

    

    
      <!-- Section constants -->
      <div class="sectiontitle">Constants</div>
      <table border='0' cellpadding='5'>
        
          <tr valign='top'>
            <td class="attr-name">YAML_MAPPING</td>
            <td>=</td>
            <td class="attr-value">{ 'Infinity' =&gt; '.Inf', '-Infinity' =&gt; '-.Inf', 'NaN' =&gt; '.NaN' }</td>
          </tr>
          
            <tr valign='top'>
              <td>&nbsp;</td>
              <td colspan="2" class="attr-desc"></td>
            </tr>
          
        
          <tr valign='top'>
            <td class="attr-name">DEFAULT_STRING_FORMAT</td>
            <td>=</td>
            <td class="attr-value">'F'</td>
          </tr>
          
            <tr valign='top'>
              <td>&nbsp;</td>
              <td colspan="2" class="attr-desc"></td>
            </tr>
          
        
      </table>
    


    


    <!-- Methods -->
        
      <div class="sectiontitle">Instance Public methods</div>
      
        <div class="method">
          <div class="title method-title" id="method-i-_original_to_s">
            
              <b>_original_to_s</b>(*args)
            
            <a href="BigDecimal.html#method-i-_original_to_s" name="method-i-_original_to_s" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-duplicable-3F">
            
              <b>duplicable?</b>()
            
            <a href="BigDecimal.html#method-i-duplicable-3F" name="method-i-duplicable-3F" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-duplicable-3F_source')" id="l_method-i-duplicable-3F_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/f4e180578c673194f58d4ff5a4a656cc51b2249e/activesupport/lib/active_support/core_ext/object/duplicable.rb#L84" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-duplicable-3F_source" class="dyn-source">
                <pre><span class="ruby-comment"># File activesupport/lib/active_support/core_ext/object/duplicable.rb, line 84</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">duplicable?</span>
  <span class="ruby-keyword">true</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-encode_with">
            
              <b>encode_with</b>(coder)
            
            <a href="BigDecimal.html#method-i-encode_with" name="method-i-encode_with" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-encode_with_source')" id="l_method-i-encode_with_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/4da888f38452d9727c77fd91cd7a267e4e1eec42/activesupport/lib/active_support/core_ext/big_decimal/conversions.rb#L8" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-encode_with_source" class="dyn-source">
                <pre><span class="ruby-comment"># File activesupport/lib/active_support/core_ext/big_decimal/conversions.rb, line 8</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">encode_with</span>(<span class="ruby-identifier">coder</span>)
  <span class="ruby-identifier">string</span> = <span class="ruby-identifier">to_s</span>
  <span class="ruby-identifier">coder</span>.<span class="ruby-identifier">represent_scalar</span>(<span class="ruby-keyword">nil</span>, <span class="ruby-constant">YAML_MAPPING</span>[<span class="ruby-identifier">string</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">string</span>)
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-to_d">
            
              <b>to_d</b>()
            
            <a href="BigDecimal.html#method-i-to_d" name="method-i-to_d" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-to_d_source')" id="l_method-i-to_d_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/4da888f38452d9727c77fd91cd7a267e4e1eec42/activesupport/lib/active_support/core_ext/big_decimal/conversions.rb#L15" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-to_d_source" class="dyn-source">
                <pre><span class="ruby-comment"># File activesupport/lib/active_support/core_ext/big_decimal/conversions.rb, line 15</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">to_d</span>
  <span class="ruby-keyword">self</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-to_formatted_s">
            
              <b>to_formatted_s</b>(*args)
            
            <a href="BigDecimal.html#method-i-to_formatted_s" name="method-i-to_formatted_s" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
            <div class="aka">
              Also aliased as: <a href="BigDecimal.html#method-i-to_s">to_s</a>
            </div>
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-to_formatted_s_source')" id="l_method-i-to_formatted_s_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/4da888f38452d9727c77fd91cd7a267e4e1eec42/activesupport/lib/active_support/core_ext/big_decimal/conversions.rb#L21" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-to_formatted_s_source" class="dyn-source">
                <pre><span class="ruby-comment"># File activesupport/lib/active_support/core_ext/big_decimal/conversions.rb, line 21</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">to_formatted_s</span>(*<span class="ruby-identifier">args</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">args</span>[<span class="ruby-number">0</span>].<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Symbol</span>)
    <span class="ruby-keyword">super</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">format</span> = <span class="ruby-identifier">args</span>[<span class="ruby-number">0</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">DEFAULT_STRING_FORMAT</span>
    <span class="ruby-identifier">_original_to_s</span>(<span class="ruby-identifier">format</span>)
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-to_s">
            
              <b>to_s</b>(*args)
            
            <a href="BigDecimal.html#method-i-to_s" name="method-i-to_s" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
            <div class="aka">
              Also aliased as: <a href="BigDecimal.html#method-i-_original_to_s">_original_to_s</a>
            </div>
          
          
          
          </div>
                    </div>

    </div>
  </body>
</html>    